//
//  IRTextView.h
//  us
//
//  Created by lhx on 2025/7/16.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN


@protocol IRTextViewDelegate;

@interface IRTextView : UIView

@property (strong, nonatomic) UITextView *contentTextView;

@property (nonatomic, assign) BOOL isBelow;

@property (assign, nonatomic) BOOL enabledControl; // determine the control view is shown or not, default is YES
@property (assign, nonatomic) BOOL enabledShakeAnimation; // default is YES

@property (assign, nonatomic) BOOL enabledBorder; // default is YES


@property (assign, nonatomic) id<IRTextViewDelegate> delegate;

- (instancetype)initWithContentFrame:(CGRect)frame;

- (void)performTapOperation;

- (void)relocalControlView;

@end

@protocol IRTextViewDelegate <NSObject>

@optional

- (void)ir_StickerViewDidTapContentView:(IRTextView *)stickerView;

- (UIImage *)ir_StickerView:(IRTextView *)stickerView imageForLeftTopControl:(CGSize)recommendedSize;

- (void)ir_StickerViewDidTapLeftTopControl:(IRTextView *)stickerView; // Effective when image is provided.

- (UIImage *)ir_StickerView:(IRTextView *)stickerView imageForRightTopControl:(CGSize)recommendedSize;

- (void)ir_StickerViewDidTapRightTopControl:(IRTextView *)stickerView; // Effective when image is provided.

- (UIImage *)ir_StickerView:(IRTextView *)stickerView imageForLeftBottomControl:(CGSize)recommendedSize;

- (void)ir_StickerViewDidTapLeftBottomControl:(IRTextView *)stickerView; // Effective when image is provided.

- (UIImage *)ir_StickerView:(IRTextView *)stickerView imageForRightBottomControl:(CGSize)recommendedSize;

- (void)ir_StickerViewDidTapRightBottomControl:(IRTextView *)stickerView; // Effective when image is provided.

@end



NS_ASSUME_NONNULL_END
